import request from '@/utils/request'

//获取首页公告列表
export function homeNoticeList(params) {
	return request({
		url: '/product/home/notice/list',
		method: 'post',
		params:params
	})
}

//根据ID查询具体的公告详情
export function homeNoticeFindById(params) {
	return request({
		url: '/product/home/notice/findById',
		method: 'post',
		params:params
	})
}

//首页公告弹窗,这里包含所有未读的
export function homeNoticeDialog(params) {
	return request({
		url: '/product/home/notice/dialog',
		method: 'post',
		params:params
	})
}

// 关闭公告弹窗
export function homeNoticeAddNoticeReadRecord(params) {
	return request({
		url: '/product/home/notice/addNoticeReadRecord',
		method: 'post',
		params:params
	})
}

//用户信息和产品信息,(热门和新产品信息有权限,与实际可以查看的产品对应)
export function homeNoticeUserProduct() {
	return request({
		url: '/product/home/notice/userProduct',
		method: 'post',
	})
}

//上传头像
export function savePortrait(params){
	return request({
		url: '/query/user/editIcon',
		method: 'post',
		params:params
	})
}

//修改密码前校验
export function checkPassword(params){
	return request({
		url: '/query/user/checkupdatepassword',
		method: 'post',
		params:params
	})
}

//修改密码
export function savePassword(params){
	return request({
		url: '/query/user/editPwd',
		method: 'post',
		params:params
	})
}

//获取卡券列表
export function queryAllCouponList(params) {
	return request({
		url: '/query/user/queryMyticket',
		method: 'get',
		params:params
	})
}

//查询乐会员兑换码
export function queryLeCode(params) {
	return request({
		url: '/query/user/queryCodenum',
		method: 'get',
		params:params
	})
}

//增加弱密码提示修改次数接口
export function userEditpwdpowercount(params) {
	return request({
		url: '/query/user/editpwdpowercount',
		method: 'post',
		params:params
	})
}

//开启上级查看数据权限接口
export function userEditqueryglobalflag(params) {
	return request({
		url: '/query/user/editqueryglobalflag',
		method: 'post',
		params:params
	})
}

//获取海报列表
export function queryPosterList(params) {
	return request({
		url: '/order/poster/list',
		method: 'post',
		params:params
	})
}

//获取海报列表
export function batchDownloadPoster(params) {
	return request({
		url: '/tools/btachdown',
		method: 'get',
		params:params,
	})
}


//获取当前海报各产品的数量
export function getPosterCount(params) {
	return request({
		url: '/order/poster/getallproductcount',
		method: 'post',
		params:params,
	})
}


//统计海报点击量
export function addPosterPV(params) {
	return request({
		url: '/order/poster/addpv',
		method: 'post',
		params:params,
	})
}

//是否展示首页赠券弹窗
export function queryShowActivity() {
	return request({
		url: '/home/isNotShow',
		method: 'post',
	})
}

//查询用户信息及是否为vip
export function queryIsVip() {
	return request({
		url: '/home/verifyIsNotDone',
		method: 'post',
	})
}

//查询用户信息及是否为vip
export function gainTicket() {
	return request({
		url: '/home/gainticket',
		method: 'post',
	})
}

//统计首页各模块点击量
export function addHomePV(params) {
	return request({
		url: '/pvuv/save',
		method: 'post',
		params:params,

	})
}


//统计首页各模块点击量
export function geta() {
	return request({
		url: '/order/activitypro/awardlist',
		method: 'post',
		params:{activityproUid:'737b37e7a74443f89884fc47e9a0a9a0'},

	})
}


//平台活动抽奖
export function getAward() {
	return request({
		url: '/order/activitypro/getaward',
		method: 'post',
		params:{activityproUid:'737b37e7a74443f89884fc47e9a0a9a0'},

	})
}

//平台活动抽奖记录
export function getActivityRecoredList() {
	return request({
		url: '/order/activitypro/recoredlist',
		method: 'post',
		params:{activityproUid:'737b37e7a74443f89884fc47e9a0a9a0'},

	})
}


//渠道弹窗显示次数查询
export function getAlertCount(params) {
	return request({
		url: '/order/activitypro/channeldialogRecordlist',
		method: 'post',
		params:params||{channelKey:'737b37e7a74443f89884fc47e9a0a9a0'},

	})
}

//渠道弹窗显示次数保存
export function saveAlertCount(params) {
	return request({
		url: '/order/activitypro/channeldialogRecord',
		method: 'post',
		params:params||{channelKey:'737b37e7a74443f89884fc47e9a0a9a0'},
	})
}